<template>
  <div>
    <v-top></v-top>
    <!-- 子路由 路由出口 -->
    <transition enter-active-class="animate__animated  animate__fadeIn">
      <router-view></router-view>
    </transition>
    <footer>
      <router-link to="/index/home" active-class="select">首页</router-link>
      <router-link to="/index/cate" active-class="select">分类</router-link>
      <router-link to="/index/shop" active-class="select">购物车</router-link>
      <router-link to="/index/mine" active-class="select">我的</router-link>
    </footer>
  </div>
</template>

<script>
export default {
  methods: {
    log() {
      console.log(this.$route.meta.title);
    },
  },
  mounted() {
    console.log("挂载完成");
  },
};
</script>

<style>
footer {
  width: 100vw;
  height: 1rem;
  background: white;
  position: fixed;
  left: 0;
  bottom: 0;
  display: flex;
}
.select {
  color: tomato;
}
footer a {
  display: inline-block;
  flex: 1;
  line-height: 1rem;
  text-align: center;
}
</style>